const http = require('http')
const path = require('path')
const fs = require('fs')
const server = http.createServer()

server.on('request',(req,res)=>{
  if(req.url == '/a.html'){
    fs.readFile(path.join(__dirname, 'a.html'),(err,data)=>{
      res.end(data.toString())
    })
  }
})